@charset 'UTF-8';

@mixin generate-font-faces($variants, $url-prefix: 'https://cdn.shopify.com/shopify-marketing_assets/static/') {
  @each $family, $weight-key, $weight-var in $variants {
    @font-face {
      font-family: $family;
      src: url("#{$url-prefix}#{$family}--#{$weight-key}.woff2") format('woff2'),
           url("#{$url-prefix}#{$family}--#{$weight-key}.woff") format('woff');
      font-style: normal;
      font-weight: $weight-var;
    }
  }
}

// font family name, font weight keyword, font weight var
$font-face-variants: (
  ('Brandon', 'light', $font-weight-light),
  ('Brandon', 'regular', $font-weight-regular),
  ('Brandon', 'medium', $font-weight-medium),
  ('Brandon', 'bold', $font-weight-bold),
  ('Brandon', 'black', $font-weight-black),
);

@include generate-font-faces($font-face-variants);
